Imports
Imports
Imports in Prism — Micro TypeScript reference.
Reference for TypeScript SDK 0.14.0.
Release source · Setup and client configuration
get
GET /v2/prism/{teamId}/imports/{jobId}
client.prism.imports.get(jobID, { ...params }) -> ImportGetResponsePoll the status of an async import. Sync imports complete in the original response and don't appear here. Async jobs are retained for 7 days. Returns 404 once the job has expired.
const _import = await client.prism.imports.get('jobId');Parameter and response types
These declarations show the request parameters and response shapes used by the methods above.
ImportGetResponse
/**
* Status snapshot of an import job. Same shape used by the POST /import response
* and by GET /imports/{jobId}.
*/
export interface ImportGetResponse {
/**
* Null for sync imports (results inlined). Set for async imports.
*/
job_id: string | null;
status: 'complete' | 'processing' | 'failed';
/**
* Total number of rows in the import.
*/
total: number;
created_at?: string;
/**
* Set when status=failed; describes the job-level failure (not per-row).
*/
error?: ImportGetResponse.Error;
expires_at?: string;
failed?: number;
/**
* Rows that have been attempted (succeeded + failed).
*/
processed?: number;
/**
* Per-row outcomes. Always present for sync imports; populated for async imports
* once the job reaches `complete`.
*/
results?: Array<ImportGetResponse.Result>;
succeeded?: number;
updated_at?: string;
}ImportGetResponse
export namespace ImportGetResponse {
/**
* Set when status=failed; describes the job-level failure (not per-row).
*/
export interface Error {
code?: string;
message?: string;
}
export interface Result {
id?: string | null;
created?: boolean;
error?: Result.Error;
/**
* True if the row matched an existing record via the dedupe key.
*/
existing?: boolean;
/**
* Zero-based position of this row in the request.
*/
input_index?: number;
/**
* True if a matching record was updated.
*/
updated?: boolean;
}
export namespace Result {
export interface Error {
code?: string;
message?: string;
}
}
}ImportGetParams
export interface ImportGetParams {
teamId?: string;
}Imports
export declare namespace Imports {
export { type ImportGetResponse as ImportGetResponse, type ImportGetParams as ImportGetParams };
}