Scan your whole stack
From OX Research Newsroom
Are you using resultar-request-typebox?
Find out what’s in your code.
Scan your apps free in minutes (opens in a new tab)Latest version: v3.0.0-beta.2
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.
| Version | Published | Status |
|---|---|---|
| 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 |
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.
The publisher’s own README, as collected from the registry.
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.
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 requestJsonFor 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.
| 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.
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.
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.
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).
The publisher’s own links, as the registry reports them. These are not sources for the assessment on this page.