client.models is a Models, client.documents a Documents, client.jobs a Jobs, client.extractionSchemas an ExtractionSchemas, client.domains a Domains, client.storageConnections a StorageConnections, client.workspaces a Workspaces, client.workspaces.files a WorkspaceFiles and client.search a Search. The decision types are in Answer types and Request types, and the parameter types in each method's section above. The document types:
A job as the document service sends it: job_id, kind (a DocumentOperation), status (a JobStatus), result, usually once it has succeeded (null for Zero retention or a legacy expired result; Classify may include a partial one while still running, with reason_status), error, credits (final once usage_final is true), usage_final, cost? (when available, the recorded customer wallet charge; may be absent or null on deployments without component pricing), timing? (server measurements for every document kind, or null), created_at, started_at?, finished_at?, and every other field the service sends, such as result_state: "available", or why a finished job's result is null ("expired" or "not_retained").
DocumentJobList
items (DocumentJob[]) and next_cursor, null on the last page.
DocumentOperation
"parse" | "split" | "classify" | "extract" | "ground", or another string a newer service sends.
JobStatus
"queued" | "running" | "succeeded" | "failed" | "cancelled", or another string a newer service sends.
JobEvent
One event from jobs.events: sequence, at, status, progress, message.
DocumentJob declares created_at?: string, started_at?: string | null and finished_at?: string | null. Start is null before execution and can stay null for a job ended before start; finish is null until NDI finishes. Both can be absent on a reduced running response during settlement, and a job Drex closes as cancelled for funding omits started_at even if NDI ran it. See Job timing.
DocumentJob.timing?: DocumentTiming | null uses the original server request for both timers. Upload, browser network/rendering and idle time awaiting a later client read are excluded. Individual missing measurements are null. Finished newly measured Parse, Extract, Split, Classify and Ground jobs carry the object. Historical/unmeasured jobs and fallback list items may omit it or return null.
For Parse, first_response_ms measures the first usable server-published preview, even if your SDK call waits for the complete result and never reads previews. When the server confirms that no preview was published and total timing is available, it equals total_ms; unavailable measurements remain null. Waiting for completion does not select a delivery mode. Other document kinds use final total for first response and leave document finalization null; Classify's partial labels are not separately measured. See Job timing and Parse streaming.
Type
What it is
DocumentTiming
received_at: string, observed_at: string, completed_at: string | null, elapsed_ms: number | null, total_ms: number | null, first_response_ms: number | null, breakdown: DocumentTimingBreakdown. Durations are milliseconds.
DocumentTimingBreakdown
Nullable millisecond values: preparation_ms, queue_ms, ndi_processing_ms, result_preparation_ms, delivery_wait_ms, document_finalization_ms. The first four sum to the total. delivery_wait_ms is excluded; document_finalization_ms is already inside NDI processing.
Each breakdown value is null until its endpoints are available and consistent: queue needs creation/start, NDI processing needs start/finish, result preparation needs finish/final response preparation, and document finalization needs preview publication/finish. delivery_wait_ms remains null until completion. Successful atomic jobs can keep document_finalization_ms: null. See Job timing for every field's availability; do not replace unknown components with zero.
An optional cost?: DocumentCost | null on DocumentJob records the customer wallet charge and is null until settlement. These types are in nace-sdk 0.4.0 and later; npm's 0.3.0 was published without its build and can't be installed, so upgrade from 0.2.0 straight to 0.4.0.
Type
What it is
DocumentCost
currency: "USD", pricing_version: string, total_usd: string, lines: DocumentCostLine[]. Exact decimal USD; separate from NDI’s service tariff.
One domain version, as list shows it: domain_id, slug, display_name, owner, version, status, parent_slug, class_count and selectable, true once published. owner is "platform", "tenant" or another string a newer service sends; status is "draft", "published" or another string a newer service sends.
Domain
A DomainSummary plus taxonomy and published_at, null for a draft.
DomainValidation
What a write found wrong with the taxonomy: valid, errors (each with code, path and message) and effective_class_count.
DomainWrite
What every domain write returns: the saved domain and its validation.
DomainPage
items (DomainSummary[]), next_cursor, null on the last page, and total_count.
A storage connection: id, name, destination, status, can_manage, external_id, aws_trusted_principal_arn (older; use aws_trusted_principal_arns), aws_trusted_principal_arns, credentials_pending, validation_running, credential_generation, validated_at, reactivation_requires_approval, revoked_reason, revoked_at and created_at. status is "draft", "ready", "degraded", "revoked" or another string a newer service sends; revoked_reason is "owner", "administrator", "member_removed", "user_disabled", another string a newer service sends, or null.
StorageConnectionPage
items (StorageConnection[]) and next_cursor, null on the last page.
StorageDestination
S3Destination | AzureBlobDestination.
S3Destination
type ("s3"), bucket, region and prefix.
AzureBlobDestination
type ("azure_blob"), account, container and prefix.
type ("azure_service_principal"), tenant_id, client_id and client_secret.
StorageSetupOptions
S3SetupOptions | AzureSetupOptions.
S3SetupOptions
type ("s3"), access_method, aws_account_id, role_name and kms_key_arn.
AzureSetupOptions
type ("azure_blob"), subscription_id, resource_group, tenant_id and client_id.
StorageConnectionSetup
options, trust_policy, permissions_policy, cloudformation_template, launch_url, role_arn and azure_cli.
WorkspaceStorage
Where a workspace keeps its files: type, connection_id, provider, location and health. type is "managed", "tenant_bucket", "external" (your own bucket or container) or another string a newer service sends; provider is "s3", "azure_blob", another string a newer service sends, or null; health is the connection's status, or null. For a workspace you were invited into, connection_id and location are null.
A workspace: workspace_id, name, owner_user_id, access, domain_id, domain_slug, domain_version, config_version, storage (a WorkspaceStorage), created_at, updated_at and status, which is "active", "deleting", "unavailable" (in a list, a workspace the service no longer has: delete it to drop it) or another string a newer service sends.
WorkspacePage
items (Workspace[]), next_cursor, null on the last page, and total_count.
WorkspaceStats
files_total, bytes_total, files_by_ingestion_status, pages_ingested, index_documents, last_ingestion_at, next_expiry_at and files_expiring_within_7d.
WorkspaceAccess
labels and default_label. Each label has a name and a description; a workspace takes up to 16.
IngestionStatus
"discovered" | "queued" | "ingesting" | "ingested" | "stale" | "expired" | "failed" | "not_required", or another string a newer service sends.
The largest limit of workspaces.list, workspaces.files.list, workspaces.files.versions and workspaces.files.outputMembers, and the page size workspaces.iterAll reads.
index (one-based integer), revision (string), content_url (authenticated string URL).
ParsePreviewSnapshot
job_id (string), status (queued/running/succeeded/failed/cancelled), nullable generation (string), nullable kind (page/sheet/section/segment), nullable total (integer), units (ParsePreviewUnit collection), more (boolean), optional nullable first_ready_at and all_ready_at (ISO timestamp strings). Terminal snapshots contain no units.
ParsePreviewContent
generation (string), index (integer), label (string), markdown (string), truncated (boolean), ready_at (ISO timestamp string).
These provisional previews do not replace the final Parse result. See Streaming.