codeforge-main-checkr-sdk
v1.3.0
Published
> **Unofficial SDK** — generated from @codeforge-main/checkr-sdk's public OpenAPI specification by the [CodeForge platform](https://www.code-forge.net). Not affiliated with or endorsed by @codeforge-main/checkr-sdk.
Readme
Unofficial SDK — generated from @codeforge-main/checkr-sdk's public OpenAPI specification by the CodeForge platform. Not affiliated with or endorsed by @codeforge-main/checkr-sdk.
codeforge-main-checkr-sdk
Version 1.3.0
Full generator behavior documentation: https://www.code-forge.net/docs
Requires Node 20+ (or a modern browser) — the generated transport uses AbortSignal.any
and AbortSignal.timeout.
Install
npm install codeforge-main-checkr-sdkyarn add codeforge-main-checkr-sdkpnpm add codeforge-main-checkr-sdkUsage
This SDK is exposed as a single, fully typed client class. Construct it once with your shared configuration and call any API operation as a method — each returns the deserialized response alongside HTTP metadata.
import { CheckrComApiDocsClient } from 'codeforge-main-checkr-sdk'
const client = new CheckrComApiDocsClient({
baseUrl: 'https://api.checkr.com/v1',
auth: { type: 'basic', username: 'YOUR_API_USERNAME', password: 'YOUR_API_PASSWORD' },
})
const response = await client.account()
console.log(response.status) // HTTP status code
console.log(response.data) // typed as AccountResponseThe client holds the shared configuration (baseUrl, auth, retry, hooks).
Each method accepts a per-call context extending HttpClientContext — supply the
operation-specific payload / parameters, and override any shared field per call.
Available operations
accountcreateAccountgetAdverseActioncancelAdverseActiongetCandidateStorydeleteCandidateStorygetFormI9createFormI9getFormI9IdgetFormI9PdflistOfCandidatescreateCandidategetCandidateDocumentsuploadDocumentlistOfDriverLicensescreateDriverLicensegetDriverLicenseupdateDriverLicensedeleteDriverLicenseemployersListByCandidatecreateEmployergetEmployeremployerDeleteschoolsListByCandidatecreateSchoolForCandidatelistOfProfessionalLicensescreateProfessionalLicensedeleteProfessionalLicensesgetSchoolschoolDeletegetCandidateSsngetCandidatePostalAddresscreatePostalAddressgetCandidateupdateCandidatedeleteCandidategetCountiesgetCountyCriminalSearchgetDocumentgetDrugAlcoholClearinghouseSearchesgetEducationVerificationgetEmploymentVerificationgetPersonalReferenceVerificationgetProfessionalReferenceVerificationgetFederalCriminalSearchgetFederalDistrictCriminalSearchgetFederalCivilSearchgetFederalDistrictCivilSearchgeosListcreateGeogetGeoupdateGeodeleteGeogetGlobalWatchlistSearchgetAccountHierarchyupdateAccountHierarchycreateAccountHierarchyNodesgetAccountHierarchyStatuslistOfInvitationscreateInvitationgetInvitationcancelInvitationgetInternationalAdverseMediaSearchgetInternationalCriminalSearchgetInternationalEducationVerificaitongetInternationalEmploymentVerificationgetInternationalGlobalWatchlistSearchgetInternationalIdentityDocumentValidationgetInternationalMotorVehicleReportgetMotorVehicleReportgetNationalCriminalSearchnodesListgetNodeupdateNodedeleteNodepackagesListgetPackagedeletePackagegetProfessionalLicenseVerificationprogramsListgetProgramcreateAdverseActioncreateReportgetReportupdateReportcompleteReportrequestReportEtagetTagsForReportaddTagToReportupdateTagsForReportdeleteTagFromReportaddressesListByReportadverseItemsByReportassessmentsByReportcreateCandidateStoryverificationsListByReportgetSexOffenderSearchgetSsnTracegetStateCriminalSearchgetSubscriptionscreateSubscriptiongetSubscriptionupdateSubscriptioncancelSubscriptionlistOfContinuousCheckscreateContinuousCheckgetContinuousCheckpostContinuousCheckcancelContinuousCheckusersListgetVerificationwebhooksListcreateWebhookgetWebhookdeleteWebhookworksitesListworksitesCreategetWorksitesupdateWorksitesdeleteWorksitesgetFacisSearch
Transport
Every request goes through the same transport: a per-attempt timeout, cancellation via
AbortSignal, and an optional custom fetch.
const client = new CheckrComApiDocsClient({
timeoutMs: 10_000, // default 60000ms, applied fresh to each retry attempt
})
const controller = new AbortController()
setTimeout(() => controller.abort(), 5_000)
await client.account({ signal: controller.signal })timeoutMs is per attempt, not per call — a request that times out and then retries gets a
fresh timer on each attempt, and throws TimeoutError if every attempt times out. A
caller-triggered AbortSignal is never retried; a timeout is, under the same rule as a
network error. Streaming operations ignore timeoutMs and support only caller
cancellation.
Custom fetch
Pass a fetch implementation to route every request through it — a proxy included, via
undici's ProxyAgent:
import { ProxyAgent, fetch as undiciFetch } from 'undici'
const dispatcher = new ProxyAgent('http://localhost:8080')
const client = new CheckrComApiDocsClient({
fetch: (url, init) => undiciFetch(url, { ...init, dispatcher }),
})hooks.makeRequest wins when both are set — it replaces the whole transport, and fetch
is read only by the built-in one.
Raw requests
An endpoint the generated operations don’t model is still reachable, through the same auth, retries, timeout and hooks:
const { data, response } = await client.get('/v1/status')
await client.post('/v1/events', { body: { type: 'ping' } })
// the general form, for a method the verb helpers don’t cover:
await client.request({ method: 'OPTIONS', path: '/v1/status' })path is joined onto baseUrl with the URL constructor — a leading / resolves from
the origin (dropping any path segment baseUrl itself carries); a relative segment
appends after it. A plain-object body is JSON-serialized with a JSON Content-Type;
pass an already-encoded value (a string, FormData, ...) to send anything else.
data parses by the response’s own Content-Type: JSON via .json(), a textual type
via .text(), anything else as a Blob.
Uploads
A multipart operation's binary part accepts a File directly. The toFile helper builds
one from bytes, a Blob, or a Node stream — fs.createReadStream(...) included, since every
Node stream is async-iterable. The source is read fully into memory before the request goes
out, so this is not a fit for uploads too large to hold in memory at once.
import { toFile } from 'codeforge-main-checkr-sdk'
import fs from 'node:fs'
const file = await toFile(fs.createReadStream('./report.pdf'), 'report.pdf', {
contentType: 'application/pdf',
})
// pass `file` as the operation's multipart field, e.g. `{ payload: { file } }`A Blob, a Uint8Array (a Node Buffer included), or a File you already have works the
same way, without toFile.
Errors
A non-OK response throws one of these HttpError subclasses, picked by an exact status
match first, then any >= 500 response as InternalServerError, then plain HttpError
for anything else. Every one of them is also an instanceof HttpError, so a catch-all
keeps working alongside a narrower check.
| Class | Status |
| --- | --- |
| BadRequestError | 400 |
| AuthenticationError | 401 |
| PermissionDeniedError | 403 |
| NotFoundError | 404 |
| ConflictError | 409 |
| UnprocessableEntityError | 422 |
| RateLimitError | 429 |
| InternalServerError | any >= 500 |
import { HttpError, NotFoundError } from 'codeforge-main-checkr-sdk'
try {
await client.account()
} catch (error) {
if (error instanceof NotFoundError) {
// error.status is narrowed to 404
} else if (error instanceof HttpError) {
// any other non-OK response — error.status is number
}
throw error
}Validation
Every model is plain data — the shape it has on the wire. This SDK carries no schemas and
no runtime dependency, so nothing is validated for you: response.data is the parsed body
typed as the operation declares it.
Regenerate the SDK with validation schemas turned on to get a zod schema exported beside every model type.
Generated by CodeForge v0.86.9.
