Introducing The Sweep: OX’s New Live Security Research Series
Register Now
Breaking: The 2026 Vulnpocalypse Hits PHP: Four Critical RCEs, but How Dangerous Are They?
Read the Report
Are you exposed? Connect your apps in minutes.
Scan your apps free

resultar-request-typebox

Latest version: v3.0.0-beta.2

Overview

Last scanned
23 Nov 2026
Published
23 Nov 2026
npm package Publisher: inaiat
5 Stars
0 Forks
7 Versions
1.0K Downloads
TypeScript Repo language

Scan summary

resultar-request-typebox was last scanned on 23 Nov 2026 at version 3.0.0-beta.2. Risk score 0 of 100. No malicious behavior was detected.

  • Releases: 7 versions; the latest 3 were published within 2 days (22 and 23 Nov 2026).
  • Findings: No rules fired in version 3.0.0-beta.2.
  • Downloads: 1,044 downloads.

Versions

7 versions published
Versions and the rules that fired in each
VersionPublishedStatus
3.0.0-beta.2 LATEST 23 Nov 2026 No rules fired
3.0.0-beta.1 23 Nov 2026 No rules fired
3.0.0-beta.0 22 Nov 2026 No rules fired
2.1.0 16 Nov 2026 Not shown
2.0.0 11 Nov 2026 Not shown

No rules fired in 3.0.0-beta.2

Findings

Findings for v3.0.0-beta.2. The score is a capped sum of the weights of the rules that fired — not CVSS, not exploitability, and not a probability. It is not comparable across packages with different scan coverage.

The score describes 3.0.0-beta.2; other versions have their own rules, not their own score.

README

The publisher’s own README, as collected from the registry.

resultar-request-typebox

TypeBox adapter for resultar-request.

Use this package when a request response should be validated with TypeBox while the transport and Resultar error flow stay in resultar-request.

Prefer requestJsonTypeBoxTask (also exported as requestJsonTask) for new lazy ResultTask workflows, and requestJsonTypeBox (also exported as requestJson) when preserving an eager ResultAsync boundary.

For a schema-library-agnostic request, use resultar-request directly with its validator or decode options. The sibling resultar-request-zod package provides the same request flow with Zod schemas instead of TypeBox.

Install

pnpm add resultar-request-typebox resultar
npm install resultar-request-typebox resultar

Import t from resultar-request-typebox to build schemas alongside the request helpers. It is a direct reexport of TypeBox's Type, including type utilities such as t.Static. TypeBox is installed automatically as a dependency (>=1.3.4 <2.0.0); no separate installation is needed when using t. Direct TypeBox imports remain compatible; declare TypeBox in your application dependencies if you import it by name. The alias does not change validation or eager/lazy execution behavior.

requestJsonTypeBoxTask and requestJson

For new lazy ResultTask services, return requestJsonTypeBoxTask directly without async or ResultTask.fromResultAsync:

import { createTaggedError, ResultTask } from 'resultar'
import {
  requestJsonTypeBoxTask,
  t,
  type RequestJsonMapError,
} from 'resultar-request-typebox'

const userSchema = t.Object(
  {
    id: t.String(),
    email: t.String(),
    plan: t.Union([t.Literal('free'), t.Literal('team')]),
  },
  { additionalProperties: false },
)

type User = t.Static<typeof userSchema>

class UserApiError extends createTaggedError({
  name: 'UserApiError',
  message: 'User API $reason: $detail',
}).withProps<{
  readonly reason: 'not-found' | 'http' | 'invalid-json' | 'request' | 'validation'
  readonly detail: string
}>() {}

const mapUserError = {
  404: ({ statusCode }) =>
    new UserApiError({ reason: 'not-found', detail: `HTTP ${statusCode}` }),
  http: ({ statusCode }) =>
    new UserApiError({ reason: 'http', detail: `HTTP ${statusCode}` }),
  invalidJson: ({ cause }) =>
    new UserApiError({ cause, reason: 'invalid-json', detail: cause.message }),
  request: ({ cause }) =>
    new UserApiError({ cause, reason: 'request', detail: cause.message }),
  validation: ({ errors }) =>
    new UserApiError({
      reason: 'validation',
      detail: `${errors.length} validation issue(s)`,
    }),
} satisfies RequestJsonMapError

const fetchUserTask = (id: string): ResultTask<User, UserApiError> =>
  requestJsonTypeBoxTask({
    request: (signal) => fetch(`https://example.com/users/${id}`, { signal }),
    schema: userSchema,
    mapError: mapUserError,
    retry: { times: 2, delayMs: 100, backoff: 2 },
  })

const loadUserLabelTask = ResultTask.fn(function* (id: string) {
  const { email, plan } = yield* fetchUserTask(id)
  return `${email} (${plan})`
})

const result = await loadUserLabelTask('123').runResult()

For existing eager ResultAsync contracts, use requestJsonTypeBox (aliased as requestJson):

import { Result, type StrictResultAsync } from 'resultar'
import { requestJson as requestJsonTypeBox } from 'resultar-request-typebox'

const fetchUser = (id: string, signal?: AbortSignal): StrictResultAsync<User, UserApiError> =>
  requestJsonTypeBox({
    signal,
    request: (attemptSignal) => fetch(`https://example.com/users/${id}`, { signal: attemptSignal }),
    schema: userSchema,
    mapError: mapUserError,
  })

const loadUserLabel = (id: string): StrictResultAsync<string, UserApiError> =>
  Result.gen(async function* () {
    const { email, plan } = yield* fetchUser(id)
    return `${email} (${plan})`
  })

t.Static<typeof userSchema> is the success type, while Resultar keeps request, HTTP, invalid-JSON, and validation failures in the typed error channel. requestJsonTypeBox / requestJsonTypeBoxTask are exported as named adapter helpers alongside package-local requestJson / requestJsonTask aliases. If an existing helper already returns ResultAsync, you can still bridge it lazily with ResultTask.fromResultAsync((signal) => fetchUser(id, signal)).

The package also re-exports the public resultar-request API, including RequestError, map-error types, retry types, and structural response types.

The TypeBox and Zod adapters share the same transport behavior: the adapter supplies schema validation, while resultar-request handles Fetch-compatible responses, JSON errors, retries, and Resultar error mapping.

Shared Request Options

Option Purpose
request (signal: AbortSignal) => Promise<Response> factory (or eager Promise in requestJson)
signal Optional AbortSignal for eager requestJson (in requestJsonTypeBoxTask, use the Task runner signal)
schema TypeBox schema used for runtime validation and Static success inference
validationError Static or computed validation failure message
mapError Status-specific and category-specific domain error mapping
retry Attempts, delay, backoff, jitter, when, and onRetry policy inherited from resultar-request

Use a request factory whenever retry is enabled. A previously created promise cannot be restarted.

Requirements

  • Node.js 24+
  • ESM only
  • typebox installed automatically as a runtime dependency (>=1.3.4 <2.0.0)

For a runnable server-backed version of this flow, see the request example.

OX Radar and Response Center

Find threats in your stack.

OX Radar can check high-priority threats, like critical package CVEs, against your context.

Each incident is marked Detected or Not Detected with a remediation plan and proof all tracked in the Response Center.

Where it’s listed

The probe returned only these fields for this server — auth requirement, protocol and tool list weren’t observed, so they’re not shown (never guessed).

  • npm resultar-request-typebox

References

The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.

Scan your whole stack

Group 1261154050 1
Group 1261154050
 

From OX Research Newsroom

Cry2Wolf: How to Tell a Real Bug from a Nothingburger
AI & VibeSec

Cry2Wolf: Not Every Branded Bug Deserves a Fire Drill

CVE

Java4Shell (CVE-2026-114938): Easy to Crash, Hard to Exploit — Less Than 0.12% of JVMs Estimated at Risk of RCE

Critical Apache HTTP Server Flaw Exposes Web Servers to RCE (1)
CVE

CVE-2026-119618: Critical Apache HTTP Server Flaw Exposes Web Servers to Remote Code Execution

Frame 2085668439 (1)
Group 1261154229