@elysiumoss/ui-capture - v0.3.0
    Preparing search index...

    Class CaptureState

    A named interaction script performed on a page before capture, so the state it produces gets its own capture set.

    name is pattern-constrained because it becomes a directory component: rejecting loudly beats silently slugifying two states into one directory, and lowercase-only avoids Spawn/spawn colliding on a case-insensitive filesystem.

    Hierarchy

    • { name: string } & { timeoutMs?: number } & { description?: string } & {
          url?: string;
      } & { extends?: string } & { precondition?: string } & {
          preconditionTimeoutMs?: number;
      } & { viewports?: readonly string[] } & {
          steps: readonly (
              | WaitForStep
              | WaitStep
              | ClickStep
              | FillStep
              | SelectStep
              | PressStep
              | RequestStep
              | ReloadStep
          )[];
      } & { allowVideoReplay: boolean } & Omit<
          {},
          | "name"
          | "timeoutMs"
          | "description"
          | "url"
          | "extends"
          | "precondition"
          | "preconditionTimeoutMs"
          | "viewports"
          | "steps"
          | "allowVideoReplay",
      >
      • CaptureState
    Index
    • Parameters

      • props: {
            name: string;
            description?: string;
            url?: string;
            extends?: string;
            precondition?: string;
            preconditionTimeoutMs?: number;
            viewports?: readonly string[];
            steps: readonly (
                | WaitForStep
                | WaitStep
                | ClickStep
                | FillStep
                | SelectStep
                | PressStep
                | RequestStep
                | ReloadStep
            )[];
            timeoutMs?: number;
            allowVideoReplay?: boolean;
        }
        • Readonlyname: string
        • Optional Readonlydescription?: string
        • Optional Readonlyurl?: string

          Absolute, or relative to the seed URL. Defaults to the seed URL.

        • Optional Readonlyextends?: string

          Prepend another state's steps to this one's. The child still starts from a fresh page load in a fresh context and replays the parent — states never inherit live page state from each other.

        • Optional Readonlyprecondition?: string

          A selector probed on the fresh load, before any step. When it is absent, the state is recorded as skipped rather than failed: "this state does not exist here" is a different event from "this state's script is broken".

          A selector that cannot be evaluated — a typo, a malformed CSS — is neither: the state fails, because a probe that silently answers "not here" to a broken selector produces a green run with nothing captured.

        • Optional ReadonlypreconditionTimeoutMs?: number

          Budget for this state's precondition probe, overriding preconditionTimeout for the run.

          Per state because readiness is not uniform: a state gated on a nav link present at first paint should not wait as long as one gated on a WebGL console's first frame, and a probe that gives up early reports the state as absent here rather than slow.

        • Optional Readonlyviewports?: readonly string[]

          Restrict this state to named viewports. The script runs once and the viewport loop resizes afterwards, so a dialog that unmounts below a breakpoint would otherwise be screenshotted as the boot view.

          An empty array is rejected rather than treated as "none": it would capture zero screenshots and still be reported as captured, and a state that captured nothing must never report success. Omit the field to use every configured viewport.

        • Readonlysteps: readonly (
              | WaitForStep
              | WaitStep
              | ClickStep
              | FillStep
              | SelectStep
              | PressStep
              | RequestStep
              | ReloadStep
          )[]
        • Optional ReadonlytimeoutMs?: number

          Budget for reaching this state — navigation, the precondition probe and the script — overriding stateTimeout for the run.

          It stops there, exactly as the run-wide default does: screenshot and video capture run outside it, under their own timeouts. A budget that covered capture too could not be satisfied by any value once --video was on.

        • Optional ReadonlyallowVideoReplay?: boolean

          Record video for this state even though its script contains a request step. Video replays the script in a second context, so a non-idempotent seed would run twice and the video would disagree with the stills; such states skip video unless this says otherwise.

      • Optionaloptions: MakeOptions

      Returns CaptureState

    Encoded: {
        name: string;
        steps: readonly (
            | {
                selector: string;
                kind: "waitFor";
                state?: "visible"
                | "hidden"
                | "attached"
                | "detached";
                minCount?: number;
                optional?: boolean;
                timeoutMs?: number;
                settleMs?: number;
            }
            | {
                kind: "wait";
                ms: number;
                optional?: boolean;
                timeoutMs?: number;
                settleMs?: number;
            }
            | {
                selector: string;
                kind: "click";
                optional?: boolean;
                timeoutMs?: number;
                settleMs?: number;
                nth?: number;
            }
            | {
                selector: string;
                kind: "fill";
                value: string;
                optional?: boolean;
                timeoutMs?: number;
                settleMs?: number;
            }
            | {
                values: readonly string[];
                selector: string;
                kind: "select";
                optional?: boolean;
                timeoutMs?: number;
                settleMs?: number;
            }
            | {
                kind: "press";
                key: string;
                selector?: string;
                optional?: boolean;
                timeoutMs?: number;
                settleMs?: number;
            }
            | {
                kind: "request";
                path: string;
                method: "GET"
                | "POST"
                | "PUT"
                | "PATCH"
                | "DELETE";
                optional?: boolean;
                timeoutMs?: number;
                settleMs?: number;
                json?: unknown;
                headers?: { readonly [key: string]: string };
                expectStatus?: number;
            }
            | {
                kind: "reload";
                optional?: boolean;
                timeoutMs?: number;
                settleMs?: number;
                waitUntil?: "load"
                | "domcontentloaded"
                | "networkidle"
                | "commit";
            }
        )[];
        timeoutMs?: number;
        description?: string;
        url?: string;
        extends?: string;
        precondition?: string;
        preconditionTimeoutMs?: number;
        viewports?: readonly string[];
        allowVideoReplay?: boolean;
    }
    Context: never

    0.69.3

    "[TypeId]": {
        _A: Invariant<CaptureState>;
        _I: Invariant<
            {
                name: string;
                steps: readonly (
                    | {
                        selector: string;
                        kind: "waitFor";
                        state?: "visible"
                        | "hidden"
                        | "attached"
                        | "detached";
                        minCount?: number;
                        optional?: boolean;
                        timeoutMs?: number;
                        settleMs?: number;
                    }
                    | {
                        kind: "wait";
                        ms: number;
                        optional?: boolean;
                        timeoutMs?: number;
                        settleMs?: number;
                    }
                    | {
                        selector: string;
                        kind: "click";
                        optional?: boolean;
                        timeoutMs?: number;
                        settleMs?: number;
                        nth?: number;
                    }
                    | {
                        selector: string;
                        kind: "fill";
                        value: string;
                        optional?: boolean;
                        timeoutMs?: number;
                        settleMs?: number;
                    }
                    | {
                        values: readonly string[];
                        selector: string;
                        kind: "select";
                        optional?: boolean;
                        timeoutMs?: number;
                        settleMs?: number;
                    }
                    | {
                        kind: "press";
                        key: string;
                        selector?: string;
                        optional?: boolean;
                        timeoutMs?: number;
                        settleMs?: number;
                    }
                    | {
                        kind: "request";
                        path: string;
                        method: "GET"
                        | "POST"
                        | "PUT"
                        | "PATCH"
                        | "DELETE";
                        optional?: boolean;
                        timeoutMs?: number;
                        settleMs?: number;
                        json?: unknown;
                        headers?: { readonly [key: string]: string };
                        expectStatus?: number;
                    }
                    | {
                        kind: "reload";
                        optional?: boolean;
                        timeoutMs?: number;
                        settleMs?: number;
                        waitUntil?: "load"
                        | "domcontentloaded"
                        | "networkidle"
                        | "commit";
                    }
                )[];
                timeoutMs?: number;
                description?: string;
                url?: string;
                extends?: string;
                precondition?: string;
                preconditionTimeoutMs?: number;
                viewports?: readonly string[];
                allowVideoReplay?: boolean;
            },
        >;
        _R: Covariant<never>;
    }
    ast: Transformation

    0.69.3

    fields: {
        name: filter<Schema<string, string, never>>;
        description: optional<typeof String$>;
        url: optional<typeof String$>;
        extends: optional<typeof String$>;
        precondition: optional<typeof String$>;
        preconditionTimeoutMs: optional<filter<Schema<number, number, never>>>;
        viewports: optional<
            filter<Schema<readonly string[], readonly string[], never>>,
        >;
        steps: Array$<
            Union<
                [
                    typeof WaitForStep,
                    typeof WaitStep,
                    typeof ClickStep,
                    typeof FillStep,
                    typeof SelectStep,
                    typeof PressStep,
                    typeof RequestStep,
                    typeof ReloadStep,
                ],
            >,
        >;
        timeoutMs: optional<filter<Schema<number, number, never>>>;
        allowVideoReplay: optionalWith<typeof Boolean$, { default: () => false }>;
    }

    Type Declaration

    • Readonlyname: filter<Schema<string, string, never>>
    • Readonlydescription: optional<typeof String$>
    • Readonlyurl: optional<typeof String$>

      Absolute, or relative to the seed URL. Defaults to the seed URL.

    • Readonlyextends: optional<typeof String$>

      Prepend another state's steps to this one's. The child still starts from a fresh page load in a fresh context and replays the parent — states never inherit live page state from each other.

    • Readonlyprecondition: optional<typeof String$>

      A selector probed on the fresh load, before any step. When it is absent, the state is recorded as skipped rather than failed: "this state does not exist here" is a different event from "this state's script is broken".

      A selector that cannot be evaluated — a typo, a malformed CSS — is neither: the state fails, because a probe that silently answers "not here" to a broken selector produces a green run with nothing captured.

    • ReadonlypreconditionTimeoutMs: optional<filter<Schema<number, number, never>>>

      Budget for this state's precondition probe, overriding preconditionTimeout for the run.

      Per state because readiness is not uniform: a state gated on a nav link present at first paint should not wait as long as one gated on a WebGL console's first frame, and a probe that gives up early reports the state as absent here rather than slow.

    • Readonlyviewports: optional<filter<Schema<readonly string[], readonly string[], never>>>

      Restrict this state to named viewports. The script runs once and the viewport loop resizes afterwards, so a dialog that unmounts below a breakpoint would otherwise be screenshotted as the boot view.

      An empty array is rejected rather than treated as "none": it would capture zero screenshots and still be reported as captured, and a state that captured nothing must never report success. Omit the field to use every configured viewport.

    • Readonlysteps: Array$<
          Union<
              [
                  typeof WaitForStep,
                  typeof WaitStep,
                  typeof ClickStep,
                  typeof FillStep,
                  typeof SelectStep,
                  typeof PressStep,
                  typeof RequestStep,
                  typeof ReloadStep,
              ],
          >,
      >
    • ReadonlytimeoutMs: optional<filter<Schema<number, number, never>>>

      Budget for reaching this state — navigation, the precondition probe and the script — overriding stateTimeout for the run.

      It stops there, exactly as the run-wide default does: screenshot and video capture run outside it, under their own timeouts. A budget that covered capture too could not be satisfied by any value once --video was on.

    • ReadonlyallowVideoReplay: optionalWith<typeof Boolean$, { default: () => false }>

      Record video for this state even though its script contains a request step. Video replays the script in a second context, so a non-idempotent seed would run twice and the video would disagree with the stills; such states skip video unless this says otherwise.

    identifier: string
    name: string = ...
    description?: string = ...
    url?: string = ...

    Absolute, or relative to the seed URL. Defaults to the seed URL.

    extends?: string = ...

    Prepend another state's steps to this one's. The child still starts from a fresh page load in a fresh context and replays the parent — states never inherit live page state from each other.

    precondition?: string = ...

    A selector probed on the fresh load, before any step. When it is absent, the state is recorded as skipped rather than failed: "this state does not exist here" is a different event from "this state's script is broken".

    A selector that cannot be evaluated — a typo, a malformed CSS — is neither: the state fails, because a probe that silently answers "not here" to a broken selector produces a green run with nothing captured.

    preconditionTimeoutMs?: number = ...

    Budget for this state's precondition probe, overriding preconditionTimeout for the run.

    Per state because readiness is not uniform: a state gated on a nav link present at first paint should not wait as long as one gated on a WebGL console's first frame, and a probe that gives up early reports the state as absent here rather than slow.

    viewports?: readonly string[] = ...

    Restrict this state to named viewports. The script runs once and the viewport loop resizes afterwards, so a dialog that unmounts below a breakpoint would otherwise be screenshotted as the boot view.

    An empty array is rejected rather than treated as "none": it would capture zero screenshots and still be reported as captured, and a state that captured nothing must never report success. Omit the field to use every configured viewport.

    steps: readonly (
        | WaitForStep
        | WaitStep
        | ClickStep
        | FillStep
        | SelectStep
        | PressStep
        | RequestStep
        | ReloadStep
    )[] = ...
    timeoutMs?: number = ...

    Budget for reaching this state — navigation, the precondition probe and the script — overriding stateTimeout for the run.

    It stops there, exactly as the run-wide default does: screenshot and video capture run outside it, under their own timeouts. A budget that covered capture too could not be satisfied by any value once --video was on.

    allowVideoReplay: boolean = ...

    Record video for this state even though its script contains a request step. Video replays the script in a second context, so a non-idempotent seed would run twice and the video would disagree with the stills; such states skip video unless this says otherwise.

    • Type Parameters

      • Args extends any[]
      • X

      Parameters

      • this: new (...args: Args) => X
      • ...args: Args

      Returns X

    • Merges a set of new annotations with existing ones, potentially overwriting any duplicates.

      Parameters

      Returns SchemaClass<
          CaptureState,
          {
              name: string;
              steps: readonly (
                  | {
                      selector: string;
                      kind: "waitFor";
                      state?: "visible"
                      | "hidden"
                      | "attached"
                      | "detached";
                      minCount?: number;
                      optional?: boolean;
                      timeoutMs?: number;
                      settleMs?: number;
                  }
                  | {
                      kind: "wait";
                      ms: number;
                      optional?: boolean;
                      timeoutMs?: number;
                      settleMs?: number;
                  }
                  | {
                      selector: string;
                      kind: "click";
                      optional?: boolean;
                      timeoutMs?: number;
                      settleMs?: number;
                      nth?: number;
                  }
                  | {
                      selector: string;
                      kind: "fill";
                      value: string;
                      optional?: boolean;
                      timeoutMs?: number;
                      settleMs?: number;
                  }
                  | {
                      values: readonly string[];
                      selector: string;
                      kind: "select";
                      optional?: boolean;
                      timeoutMs?: number;
                      settleMs?: number;
                  }
                  | {
                      kind: "press";
                      key: string;
                      selector?: string;
                      optional?: boolean;
                      timeoutMs?: number;
                      settleMs?: number;
                  }
                  | {
                      kind: "request";
                      path: string;
                      method: "GET"
                      | "POST"
                      | "PUT"
                      | "PATCH"
                      | "DELETE";
                      optional?: boolean;
                      timeoutMs?: number;
                      settleMs?: number;
                      json?: unknown;
                      headers?: { readonly [key: string]: string };
                      expectStatus?: number;
                  }
                  | {
                      kind: "reload";
                      optional?: boolean;
                      timeoutMs?: number;
                      settleMs?: number;
                      waitUntil?: "load"
                      | "domcontentloaded"
                      | "networkidle"
                      | "commit";
                  }
              )[];
              timeoutMs?: number;
              description?: string;
              url?: string;
              extends?: string;
              precondition?: string;
              preconditionTimeoutMs?: number;
              viewports?: readonly string[];
              allowVideoReplay?: boolean;
          },
          never,
      >

    • Type Parameters

      • Extended = never

      Parameters

      • identifier: string

      Returns <newFields extends Fields>(
          fields: newFields | HasFields<newFields>,
          annotations?: Schema<Extended, readonly []>,
      ) => [Extended] extends [never]
          ? "Missing `Self` generic - use `class Self extends Base.extend<Self>()({ ... })`"
          : Class<
              Extended,
              {
                  name: filter<Schema<string, string, never>>;
                  description: optional<typeof String$>;
                  url: optional<typeof String$>;
                  extends: optional<typeof String$>;
                  precondition: optional<typeof String$>;
                  preconditionTimeoutMs: optional<filter<Schema<number, number, never>>>;
                  viewports: optional<
                      filter<Schema<readonly string[], readonly string[], never>>,
                  >;
                  steps: Array$<
                      Union<
                          [
                              typeof WaitForStep,
                              typeof WaitStep,
                              typeof ClickStep,
                              typeof FillStep,
                              typeof SelectStep,
                              typeof PressStep,
                              typeof RequestStep,
                              typeof ReloadStep,
                          ],
                      >,
                  >;
                  timeoutMs: optional<filter<Schema<number, number, never>>>;
                  allowVideoReplay: optionalWith<typeof Boolean$, { default: () => false }>;
              } & newFields,
              {
                  name: string;
                  steps: readonly (
                      | {
                          selector: string;
                          kind: "waitFor";
                          state?: "visible"
                          | "hidden"
                          | "attached"
                          | "detached";
                          minCount?: number;
                          optional?: boolean;
                          timeoutMs?: number;
                          settleMs?: number;
                      }
                      | {
                          kind: "wait";
                          ms: number;
                          optional?: boolean;
                          timeoutMs?: number;
                          settleMs?: number;
                      }
                      | {
                          selector: string;
                          kind: "click";
                          optional?: boolean;
                          timeoutMs?: number;
                          settleMs?: number;
                          nth?: number;
                      }
                      | {
                          selector: string;
                          kind: "fill";
                          value: string;
                          optional?: boolean;
                          timeoutMs?: number;
                          settleMs?: number;
                      }
                      | {
                          values: readonly string[];
                          selector: string;
                          kind: "select";
                          optional?: boolean;
                          timeoutMs?: number;
                          settleMs?: number;
                      }
                      | {
                          kind: "press";
                          key: string;
                          selector?: string;
                          optional?: boolean;
                          timeoutMs?: number;
                          settleMs?: number;
                      }
                      | {
                          kind: "request";
                          path: string;
                          method: "GET"
                          | "POST"
                          | "PUT"
                          | "PATCH"
                          | "DELETE";
                          optional?: boolean;
                          timeoutMs?: number;
                          settleMs?: number;
                          json?: unknown;
                          headers?: { readonly [key: string]: string };
                          expectStatus?: number;
                      }
                      | {
                          kind: "reload";
                          optional?: boolean;
                          timeoutMs?: number;
                          settleMs?: number;
                          waitUntil?: "load"
                          | "domcontentloaded"
                          | "networkidle"
                          | "commit";
                      }
                  )[];
              } & {
                  timeoutMs?: number;
                  description?: string;
                  url?: string;
                  extends?: string;
                  precondition?: string;
                  preconditionTimeoutMs?: number;
                  viewports?: readonly string[];
                  allowVideoReplay?: boolean;
              } & {
                  readonly [K in string
                  | number
                  | symbol as Key<newFields, K>]: Encoded<newFields[K]>
              } & {
                  readonly [K in string
                  | number
                  | symbol as Key<newFields, K>]?: Encoded<newFields[K]>
              },
              Context<newFields[keyof newFields]>,
              { name: string } & { timeoutMs?: number } & { description?: string } & {
                  url?: string;
              } & { extends?: string } & { precondition?: string } & {
                  preconditionTimeoutMs?: number;
              } & { viewports?: readonly string[] } & {
                  steps: readonly (
                      | WaitForStep
                      | WaitStep
                      | ClickStep
                      | FillStep
                      | SelectStep
                      | PressStep
                      | RequestStep
                      | ReloadStep
                  )[];
              } & { allowVideoReplay?: boolean } & Constructor<newFields>,
              CaptureState,
              {},
          >

    • Type Parameters

      • Transformed = never

      Parameters

      • identifier: string

      Returns <newFields extends Fields, R2, R3>(
          fields: newFields,
          options: {
              decode: (
                  input: {
                      name: string;
                      description?: string;
                      url?: string;
                      extends?: string;
                      precondition?: string;
                      preconditionTimeoutMs?: number;
                      viewports?: readonly string[];
                      steps: readonly (
                          | WaitForStep
                          | WaitStep
                          | ClickStep
                          | FillStep
                          | SelectStep
                          | PressStep
                          | RequestStep
                          | ReloadStep
                      )[];
                      timeoutMs?: number;
                      allowVideoReplay: boolean;
                  },
                  options: ParseOptions,
                  ast: Transformation,
              ) => Effect<
                  {
                      [K in string
                      | number
                      | symbol]: Type<
                          {
                              name: filter<Schema<(...), (...), (...)>>;
                              description: optional<typeof String$>;
                              url: optional<typeof String$>;
                              extends: optional<typeof String$>;
                              precondition: optional<typeof String$>;
                              preconditionTimeoutMs: optional<filter<(...)>>;
                              viewports: optional<filter<(...)>>;
                              steps: Array$<Union<(...)>>;
                              timeoutMs: optional<filter<(...)>>;
                              allowVideoReplay: optionalWith<typeof Boolean$, { default: ... }>;
                          } & newFields,
                      >[K]
                  },
                  ParseIssue,
                  R2,
              >;
              encode: (
                  input: {
                      [K in string | number | symbol]: Type<
                          {
                              name: filter<Schema<string, string, never>>;
                              description: optional<typeof String$>;
                              url: optional<typeof String$>;
                              extends: optional<typeof String$>;
                              precondition: optional<typeof String$>;
                              preconditionTimeoutMs: optional<filter<Schema<(...), (...), (...)>>>;
                              viewports: optional<filter<Schema<(...), (...), (...)>>>;
                              steps: Array$<
                                  Union<[(...), (...), (...), (...), (...), (...), (...), (...)]>,
                              >;
                              timeoutMs: optional<filter<Schema<(...), (...), (...)>>>;
                              allowVideoReplay: optionalWith<
                                  typeof Boolean$,
                                  { default: () => ... },
                              >;
                          } & newFields,
                      >[K]
                  },
                  options: ParseOptions,
                  ast: Transformation,
              ) => Effect<
                  { name: string } & { timeoutMs?: number } & { description?: string } & {
                      url?: string;
                  } & { extends?: string } & { precondition?: string } & {
                      preconditionTimeoutMs?: number;
                  } & { viewports?: readonly string[] } & {
                      steps: readonly (
                          | WaitForStep
                          | WaitStep
                          | ClickStep
                          | FillStep
                          | SelectStep
                          | PressStep
                          | RequestStep
                          | ReloadStep
                      )[];
                  } & { allowVideoReplay: boolean },
                  ParseIssue,
                  R3,
              >;
          },
          annotations?: Schema<Transformed, readonly []>,
      ) => [Transformed] extends [never]
          ? "Missing `Self` generic - use `class Self extends Base.transformOrFail<Self>()({ ... })`"
          : Class<
              Transformed,
              {
                  name: filter<Schema<string, string, never>>;
                  description: optional<typeof String$>;
                  url: optional<typeof String$>;
                  extends: optional<typeof String$>;
                  precondition: optional<typeof String$>;
                  preconditionTimeoutMs: optional<filter<Schema<number, number, never>>>;
                  viewports: optional<
                      filter<Schema<readonly string[], readonly string[], never>>,
                  >;
                  steps: Array$<
                      Union<
                          [
                              typeof WaitForStep,
                              typeof WaitStep,
                              typeof ClickStep,
                              typeof FillStep,
                              typeof SelectStep,
                              typeof PressStep,
                              typeof RequestStep,
                              typeof ReloadStep,
                          ],
                      >,
                  >;
                  timeoutMs: optional<filter<Schema<number, number, never>>>;
                  allowVideoReplay: optionalWith<typeof Boolean$, { default: () => false }>;
              } & newFields,
              Encoded<
                  {
                      name: filter<Schema<string, string, never>>;
                      description: optional<typeof String$>;
                      url: optional<typeof String$>;
                      extends: optional<typeof String$>;
                      precondition: optional<typeof String$>;
                      preconditionTimeoutMs: optional<filter<Schema<number, number, never>>>;
                      viewports: optional<
                          filter<Schema<readonly string[], readonly string[], never>>,
                      >;
                      steps: Array$<
                          Union<
                              [
                                  typeof WaitForStep,
                                  typeof WaitStep,
                                  typeof ClickStep,
                                  typeof FillStep,
                                  typeof SelectStep,
                                  typeof PressStep,
                                  typeof RequestStep,
                                  typeof ReloadStep,
                              ],
                          >,
                      >;
                      timeoutMs: optional<filter<Schema<number, number, never>>>;
                      allowVideoReplay: optionalWith<
                          typeof Boolean$,
                          { default: () => false },
                      >;
                  },
              >,
              R2
              | R3
              | Context<newFields[keyof newFields]>,
              { name: string } & { timeoutMs?: number } & { description?: string } & {
                  url?: string;
              } & { extends?: string } & { precondition?: string } & {
                  preconditionTimeoutMs?: number;
              } & { viewports?: readonly string[] } & {
                  steps: readonly (
                      | WaitForStep
                      | WaitStep
                      | ClickStep
                      | FillStep
                      | SelectStep
                      | PressStep
                      | RequestStep
                      | ReloadStep
                  )[];
              } & { allowVideoReplay?: boolean } & Constructor<newFields>,
              CaptureState,
              {},
          >

    • Type Parameters

      • Transformed = never

      Parameters

      • identifier: string

      Returns <newFields extends Fields, R2, R3>(
          fields: newFields,
          options: {
              decode: (
                  input: {
                      name: string;
                      steps: readonly (
                          | {
                              selector: string;
                              kind: "waitFor";
                              state?: "visible"
                              | "hidden"
                              | "attached"
                              | "detached";
                              minCount?: number;
                              optional?: boolean;
                              timeoutMs?: number;
                              settleMs?: number;
                          }
                          | {
                              kind: "wait";
                              ms: number;
                              optional?: boolean;
                              timeoutMs?: number;
                              settleMs?: number;
                          }
                          | {
                              selector: string;
                              kind: "click";
                              optional?: boolean;
                              timeoutMs?: number;
                              settleMs?: number;
                              nth?: number;
                          }
                          | {
                              selector: string;
                              kind: "fill";
                              value: string;
                              optional?: boolean;
                              timeoutMs?: number;
                              settleMs?: number;
                          }
                          | {
                              values: readonly string[];
                              selector: string;
                              kind: "select";
                              optional?: boolean;
                              timeoutMs?: number;
                              settleMs?: number;
                          }
                          | {
                              kind: "press";
                              key: string;
                              selector?: string;
                              optional?: boolean;
                              timeoutMs?: number;
                              settleMs?: number;
                          }
                          | {
                              kind: "request";
                              path: string;
                              method: "GET"
                              | "POST"
                              | "PUT"
                              | "PATCH"
                              | "DELETE";
                              optional?: boolean;
                              timeoutMs?: number;
                              settleMs?: number;
                              json?: unknown;
                              headers?: { readonly [key: string]: string };
                              expectStatus?: number;
                          }
                          | {
                              kind: "reload";
                              optional?: boolean;
                              timeoutMs?: number;
                              settleMs?: number;
                              waitUntil?: "load"
                              | "domcontentloaded"
                              | "networkidle"
                              | "commit";
                          }
                      )[];
                      timeoutMs?: number;
                      description?: string;
                      url?: string;
                      extends?: string;
                      precondition?: string;
                      preconditionTimeoutMs?: number;
                      viewports?: readonly string[];
                      allowVideoReplay?: boolean;
                  },
                  options: ParseOptions,
                  ast: Transformation,
              ) => Effect<
                  {
                      [K in string
                      | number
                      | symbol]: (
                          {
                              name: string;
                              steps: readonly (
                                  | {
                                      selector: ...;
                                      kind: ...;
                                      state?: ...;
                                      minCount?: ...;
                                      optional?: ...;
                                      timeoutMs?: ...;
                                      settleMs?: ...;
                                  }
                                  | {
                                      kind: ...;
                                      ms: ...;
                                      optional?: ...;
                                      timeoutMs?: ...;
                                      settleMs?: ...;
                                  }
                                  | {
                                      selector: ...;
                                      kind: ...;
                                      optional?: ...;
                                      timeoutMs?: ...;
                                      settleMs?: ...;
                                      nth?: ...;
                                  }
                                  | {
                                      selector: ...;
                                      kind: ...;
                                      value: ...;
                                      optional?: ...;
                                      timeoutMs?: ...;
                                      settleMs?: ...;
                                  }
                                  | {
                                      values: ...;
                                      selector: ...;
                                      kind: ...;
                                      optional?: ...;
                                      timeoutMs?: ...;
                                      settleMs?: ...;
                                  }
                                  | {
                                      kind: ...;
                                      key: ...;
                                      selector?: ...;
                                      optional?: ...;
                                      timeoutMs?: ...;
                                      settleMs?: ...;
                                  }
                                  | {
                                      kind: ...;
                                      path: ...;
                                      method: ...;
                                      optional?: ...;
                                      timeoutMs?: ...;
                                      settleMs?: ...;
                                      json?: ...;
                                      headers?: ...;
                                      expectStatus?: ...;
                                  }
                                  | {
                                      kind: ...;
                                      optional?: ...;
                                      timeoutMs?: ...;
                                      settleMs?: ...;
                                      waitUntil?: ...;
                                  }
                              )[];
                          } & {
                              timeoutMs?: number;
                              description?: string;
                              url?: string;
                              extends?: string;
                              precondition?: string;
                              preconditionTimeoutMs?: number;
                              viewports?: readonly string[];
                              allowVideoReplay?: boolean;
                          } & {
                              readonly [K in string
                              | number
                              | symbol as Key<newFields, K>]: Encoded<newFields[K]>
                          } & {
                              readonly [K in string
                              | number
                              | symbol as Key<newFields, K>]?: Encoded<(...)[(...)]>
                          }
                      )[K]
                  },
                  ParseIssue,
                  R2,
              >;
              encode: (
                  input: {
                      [K in string | number | symbol]: (
                          {
                              name: string;
                              steps: readonly (
                                  | {
                                      selector: string;
                                      kind: "waitFor";
                                      state?: (...)
                                      | (...)
                                      | (...)
                                      | (...)
                                      | (...);
                                      minCount?: (...) | (...);
                                      optional?: (...) | (...) | (...);
                                      timeoutMs?: (...) | (...);
                                      settleMs?: (...) | (...);
                                  }
                                  | {
                                      kind: "wait";
                                      ms: number;
                                      optional?: (...)
                                      | (...)
                                      | (...);
                                      timeoutMs?: (...) | (...);
                                      settleMs?: (...) | (...);
                                  }
                                  | {
                                      selector: string;
                                      kind: "click";
                                      optional?: (...)
                                      | (...)
                                      | (...);
                                      timeoutMs?: (...) | (...);
                                      settleMs?: (...) | (...);
                                      nth?: (...) | (...);
                                  }
                                  | {
                                      selector: string;
                                      kind: "fill";
                                      value: string;
                                      optional?: (...)
                                      | (...)
                                      | (...);
                                      timeoutMs?: (...) | (...);
                                      settleMs?: (...) | (...);
                                  }
                                  | {
                                      values: readonly (...)[];
                                      selector: string;
                                      kind: "select";
                                      optional?: (...) | (...) | (...);
                                      timeoutMs?: (...) | (...);
                                      settleMs?: (...) | (...);
                                  }
                                  | {
                                      kind: "press";
                                      key: string;
                                      selector?: (...)
                                      | (...);
                                      optional?: (...) | (...) | (...);
                                      timeoutMs?: (...) | (...);
                                      settleMs?: (...) | (...);
                                  }
                                  | {
                                      kind: "request";
                                      path: string;
                                      method: (...)
                                      | (...)
                                      | (...)
                                      | (...)
                                      | (...);
                                      optional?: (...) | (...) | (...);
                                      timeoutMs?: (...) | (...);
                                      settleMs?: (...) | (...);
                                      json?: unknown;
                                      headers?: (...) | (...);
                                      expectStatus?: (...) | (...);
                                  }
                                  | {
                                      kind: "reload";
                                      optional?: (...)
                                      | (...)
                                      | (...);
                                      timeoutMs?: (...) | (...);
                                      settleMs?: (...) | (...);
                                      waitUntil?: (...) | (...) | (...) | (...) | (...);
                                  }
                              )[];
                          } & {
                              timeoutMs?: number;
                              description?: string;
                              url?: string;
                              extends?: string;
                              precondition?: string;
                              preconditionTimeoutMs?: number;
                              viewports?: readonly string[];
                              allowVideoReplay?: boolean;
                          } & {
                              readonly [K in string
                              | number
                              | symbol as Key<newFields, K>]: Encoded<newFields[K]>
                          } & {
                              readonly [K in string
                              | number
                              | symbol as Key<newFields, K>]?: Encoded<newFields[K]>
                          }
                      )[K]
                  },
                  options: ParseOptions,
                  ast: Transformation,
              ) => Effect<
                  Encoded<
                      {
                          name: filter<Schema<string, string, never>>;
                          description: optional<typeof String$>;
                          url: optional<typeof String$>;
                          extends: optional<typeof String$>;
                          precondition: optional<typeof String$>;
                          preconditionTimeoutMs: optional<filter<Schema<number, number, never>>>;
                          viewports: optional<
                              filter<Schema<readonly string[], readonly string[], never>>,
                          >;
                          steps: Array$<
                              Union<
                                  [
                                      typeof WaitForStep,
                                      typeof WaitStep,
                                      typeof ClickStep,
                                      typeof FillStep,
                                      typeof SelectStep,
                                      typeof PressStep,
                                      typeof RequestStep,
                                      typeof ReloadStep,
                                  ],
                              >,
                          >;
                          timeoutMs: optional<filter<Schema<number, number, never>>>;
                          allowVideoReplay: optionalWith<
                              typeof Boolean$,
                              { default: () => false },
                          >;
                      },
                  >,
                  ParseIssue,
                  R3,
              >;
          },
          annotations?: Schema<Transformed, readonly []>,
      ) => [Transformed] extends [never]
          ? "Missing `Self` generic - use `class Self extends Base.transformOrFailFrom<Self>()({ ... })`"
          : Class<
              Transformed,
              {
                  name: filter<Schema<string, string, never>>;
                  description: optional<typeof String$>;
                  url: optional<typeof String$>;
                  extends: optional<typeof String$>;
                  precondition: optional<typeof String$>;
                  preconditionTimeoutMs: optional<filter<Schema<number, number, never>>>;
                  viewports: optional<
                      filter<Schema<readonly string[], readonly string[], never>>,
                  >;
                  steps: Array$<
                      Union<
                          [
                              typeof WaitForStep,
                              typeof WaitStep,
                              typeof ClickStep,
                              typeof FillStep,
                              typeof SelectStep,
                              typeof PressStep,
                              typeof RequestStep,
                              typeof ReloadStep,
                          ],
                      >,
                  >;
                  timeoutMs: optional<filter<Schema<number, number, never>>>;
                  allowVideoReplay: optionalWith<typeof Boolean$, { default: () => false }>;
              } & newFields,
              Encoded<
                  {
                      name: filter<Schema<string, string, never>>;
                      description: optional<typeof String$>;
                      url: optional<typeof String$>;
                      extends: optional<typeof String$>;
                      precondition: optional<typeof String$>;
                      preconditionTimeoutMs: optional<filter<Schema<number, number, never>>>;
                      viewports: optional<
                          filter<Schema<readonly string[], readonly string[], never>>,
                      >;
                      steps: Array$<
                          Union<
                              [
                                  typeof WaitForStep,
                                  typeof WaitStep,
                                  typeof ClickStep,
                                  typeof FillStep,
                                  typeof SelectStep,
                                  typeof PressStep,
                                  typeof RequestStep,
                                  typeof ReloadStep,
                              ],
                          >,
                      >;
                      timeoutMs: optional<filter<Schema<number, number, never>>>;
                      allowVideoReplay: optionalWith<
                          typeof Boolean$,
                          { default: () => false },
                      >;
                  },
              >,
              R2
              | R3
              | Context<newFields[keyof newFields]>,
              { name: string } & { timeoutMs?: number } & { description?: string } & {
                  url?: string;
              } & { extends?: string } & { precondition?: string } & {
                  preconditionTimeoutMs?: number;
              } & { viewports?: readonly string[] } & {
                  steps: readonly (
                      | WaitForStep
                      | WaitStep
                      | ClickStep
                      | FillStep
                      | SelectStep
                      | PressStep
                      | RequestStep
                      | ReloadStep
                  )[];
              } & { allowVideoReplay?: boolean } & Constructor<newFields>,
              CaptureState,
              {},
          >

    • Type Parameters

      • A

      Parameters

      • this: A

      Returns A

    • Type Parameters

      • A
      • B = never

      Parameters

      • this: A
      • ab: (_: A) => B

      Returns B

    • Type Parameters

      • A
      • B = never
      • C = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C

      Returns C

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D

      Returns D

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E

      Returns E

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F

      Returns F

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G

      Returns G

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H

      Returns H

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I

      Returns I

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J

      Returns J

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never
      • K = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J
      • jk: (_: J) => K

      Returns K

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never
      • K = never
      • L = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J
      • jk: (_: J) => K
      • kl: (_: K) => L

      Returns L

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never
      • K = never
      • L = never
      • M = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J
      • jk: (_: J) => K
      • kl: (_: K) => L
      • lm: (_: L) => M

      Returns M

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never
      • K = never
      • L = never
      • M = never
      • N = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J
      • jk: (_: J) => K
      • kl: (_: K) => L
      • lm: (_: L) => M
      • mn: (_: M) => N

      Returns N

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never
      • K = never
      • L = never
      • M = never
      • N = never
      • O = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J
      • jk: (_: J) => K
      • kl: (_: K) => L
      • lm: (_: L) => M
      • mn: (_: M) => N
      • no: (_: N) => O

      Returns O

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never
      • K = never
      • L = never
      • M = never
      • N = never
      • O = never
      • P = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J
      • jk: (_: J) => K
      • kl: (_: K) => L
      • lm: (_: L) => M
      • mn: (_: M) => N
      • no: (_: N) => O
      • op: (_: O) => P

      Returns P

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never
      • K = never
      • L = never
      • M = never
      • N = never
      • O = never
      • P = never
      • Q = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J
      • jk: (_: J) => K
      • kl: (_: K) => L
      • lm: (_: L) => M
      • mn: (_: M) => N
      • no: (_: N) => O
      • op: (_: O) => P
      • pq: (_: P) => Q

      Returns Q

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never
      • K = never
      • L = never
      • M = never
      • N = never
      • O = never
      • P = never
      • Q = never
      • R = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J
      • jk: (_: J) => K
      • kl: (_: K) => L
      • lm: (_: L) => M
      • mn: (_: M) => N
      • no: (_: N) => O
      • op: (_: O) => P
      • pq: (_: P) => Q
      • qr: (_: Q) => R

      Returns R

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never
      • K = never
      • L = never
      • M = never
      • N = never
      • O = never
      • P = never
      • Q = never
      • R = never
      • S = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J
      • jk: (_: J) => K
      • kl: (_: K) => L
      • lm: (_: L) => M
      • mn: (_: M) => N
      • no: (_: N) => O
      • op: (_: O) => P
      • pq: (_: P) => Q
      • qr: (_: Q) => R
      • rs: (_: R) => S

      Returns S

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never
      • K = never
      • L = never
      • M = never
      • N = never
      • O = never
      • P = never
      • Q = never
      • R = never
      • S = never
      • T = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J
      • jk: (_: J) => K
      • kl: (_: K) => L
      • lm: (_: L) => M
      • mn: (_: M) => N
      • no: (_: N) => O
      • op: (_: O) => P
      • pq: (_: P) => Q
      • qr: (_: Q) => R
      • rs: (_: R) => S
      • st: (_: S) => T

      Returns T

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never
      • K = never
      • L = never
      • M = never
      • N = never
      • O = never
      • P = never
      • Q = never
      • R = never
      • S = never
      • T = never
      • U = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J
      • jk: (_: J) => K
      • kl: (_: K) => L
      • lm: (_: L) => M
      • mn: (_: M) => N
      • no: (_: N) => O
      • op: (_: O) => P
      • pq: (_: P) => Q
      • qr: (_: Q) => R
      • rs: (_: R) => S
      • st: (_: S) => T
      • tu: (_: T) => U

      Returns U

    • Type Parameters

      • A
      • B = never
      • C = never
      • D = never
      • E = never
      • F = never
      • G = never
      • H = never
      • I = never
      • J = never
      • K = never
      • L = never
      • M = never
      • N = never
      • O = never
      • P = never
      • Q = never
      • R = never
      • S = never
      • T = never
      • U = never

      Parameters

      • this: A
      • ab: (_: A) => B
      • bc: (_: B) => C
      • cd: (_: C) => D
      • de: (_: D) => E
      • ef: (_: E) => F
      • fg: (_: F) => G
      • gh: (_: G) => H
      • hi: (_: H) => I
      • ij: (_: I) => J
      • jk: (_: J) => K
      • kl: (_: K) => L
      • lm: (_: L) => M
      • mn: (_: M) => N
      • no: (_: N) => O
      • op: (_: O) => P
      • pq: (_: P) => Q
      • qr: (_: Q) => R
      • rs: (_: R) => S
      • st: (_: S) => T
      • tu: (_: T) => U

      Returns U