TheIntroDB Package Docs

Documentation for the theintrodb NPM package

View on GitHub

Types

Exported Constants

MEDIA_TYPES

Readonly array of supported media kinds:

SEGMENT_TYPES

Readonly array of supported segment kinds:

SUBMISSION_STATUSES

Readonly array of submission states:

Core Client Types

TIDBClient

Returned by createIntroDbClient().

Methods:

TIDBClientOptions

Shared options for a reusable client instance.

Fields:

TIDBRequestOptions

Per-request overrides for client methods.

Fields:

TIDBTransportOptions

Transport options used by standalone functions.

Fields:

TIDBLogger

Optional logging interface.

Methods:

Media Types

MediaType

Union of:

SegmentType

Union of:

SubmissionStatus

Union of:

Request Types

GetMediaParams

Fields:

Notes:

SubmitMediaBase

Shared base fields for submission inputs.

Fields:

SubmitMediaSecondsInput

Seconds-based submission.

Fields:

SubmitMediaMillisecondsInput

Milliseconds-based submission.

Fields:

SubmitMediaTimestampInput

Union of:

SubmissionRequestPayload

Serialized raw payload sent to /submit.

Fields:

Response Types

API Time Naming

TheIntroDB uses two different naming styles depending on context:

The API also uses two different time units depending on request direction:

SegmentTimestampRaw

Raw timestamp object from the API.

Fields:

Notes:

NormalizedSegmentTimestamp

Normalized runtime timestamp shape.

Fields:

Notes:

MediaResponseRaw

Raw /media response.

MediaRecord

Normalized media result returned by the package.

Fields:

Notes:

SubmissionDataRaw

Raw submission object from the API.

Notes:

SubmissionData

Normalized submission object returned by the package.

Fields:

Notes:

SubmissionResponseRaw

Raw success response from /submit.

Fields:

SubmissionResponse

Normalized success response returned by the package.

Fields:

Utility Types

RateLimitDetails

Parsed rate-limit and usage-limit metadata.

ErrorResponse

API error body shape.

HeadersLike

Minimal header reader contract used by the transport layer.

FetchResponseLike

Minimal fetch response shape expected by the package.

FetchLike

Minimal fetch function shape accepted by the package.