Skip to main content

TypeScript types

Stable imports​

import type {
Job,
JobEvent,
JobStage,
JobStatus,
MediaUploadRequest,
Report,
ReportCreateRequest,
ReportJobReceipt,
ReportOutput,
ReportRunHandle,
ReportSource,
TargetSelector,
WebhookConfig,
} from "@mappa-ai/conduit"

Core request type​

type ReportCreateRequest = {
source: ReportSource
output: ReportOutput
target: TargetSelector
label?: string
entityLabel?: string
webhook?: WebhookConfig
idempotencyKey?: string
requestId?: string
signal?: AbortSignal
}

Source union​

type ReportSource =
| { mediaId: string }
| { file: Blob | ArrayBuffer | Uint8Array | ReadableStream<Uint8Array>; label?: string }
| { url: string; label?: string }
| { path: string; label?: string }

Stable primitives​

type MediaUploadRequest =
| { file: Blob | ArrayBuffer | Uint8Array | ReadableStream<Uint8Array>; label?: string }
| { url: string; label?: string }
| { path: string; label?: string }

Matching imports​

import { Conduit } from "@mappa-ai/conduit"
import type {
MatchingAnalysisCreateJobRequest,
MatchingAnalysisJobReceipt,
MatchingAnalysisResponse,
} from "@mappa-ai/conduit"